//导入express
const express = require('express')
    // 创建路由对象
const router = express.Router()
    //导入escook/express@joi
const expressJoi = require('@escook/express-joi')
    //导入验证规则
const { reg_login_schema } = require('../schema/user')
    //导入登录注册处理方法
const userHandle = require('../router_handle/user')
    //注册路由
router.post('/reg', expressJoi(reg_login_schema), userHandle.reg)
router.post('/login', expressJoi(reg_login_schema), userHandle.login)
    //向外共享router对象
module.exports = router